//
// Created by dell on 2025/8/26.
//
#include "iostream"
using namespace std;
int main() {
    // 数组元素的插入
    int *p_arr01 = new int[5]{1,2,4,5,6};

    int *p_arr02 = new int[7];

    int offset = 0;
    for (int i = 0; i < 7; i++) {
        if (i == 2) {
            p_arr02[i] = 3;
            offset++;
        }
        else if (i == 6) {
            p_arr02[i] = 7;
            offset++;
        }
        else {
            p_arr02[i] = p_arr01[i - offset];
        }
    }
    for (int i = 0; i < 7; i++) {
        if (i == 0) {
            cout << "[" << p_arr02[i] << ",";
        }
        else if (i == 6) {
            cout << p_arr02[i] << "]" <<endl;
        }
        else {
            cout << p_arr02[i] << ",";
        }
    }
    delete p_arr01;

   // p_arr01 = p_arr02;




    return 0;
}